package cn.online.model;

import javax.persistence.*;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "course")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Course implements java.io.Serializable {

	private Integer cid;
	private String cname;
	private String cpic;

	public Course() {
	}

	public Course(String cname, String cpic) {
		this.cname = cname;
		this.cpic = cpic;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "c_id", nullable = false, updatable = false)
	public Integer getCid() {
		return this.cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	@Column(name = "c_name", nullable = false, length = 20)
	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	@Column(name = "c_pic", nullable = false, length = 100)
	public String getCpic() {
		return this.cpic;
	}

	public void setCpic(String cpic) {
		this.cpic = cpic;
	}
}